﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Liang.UI
{
    public partial class FrmPrintMsg : Form
    {
        public FrmPrintMsg()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="title">窗体标题</param>
        /// <param name="printMsg">提示信息</param>
        public void SetPrintMsg(string title,string printMsg)
        {
            Text = title;
            if (label_printMsg.InvokeRequired)
            {
                Action<string> setInfo = (x) => { label_printMsg.Text = x; };
                label_printMsg.Invoke(setInfo, printMsg);
            }
            else
            {
                label_printMsg.Text = printMsg;
            }
        }
    }
}
